#include <stdio.h>

//https://www.nowcoder.com/practice/f3a134908d5b41869f14f58307008a97?tpId=290&tqId=309321&ru=/exam/oj/ta&qru=/ta/beginner-programmers/question-ranking&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D290

#define count 7

int main() {
    int min = 0;
    while (scanf("%d", &min) != EOF) {
        int num = 0;
        int max = 0;
        float sum = 0;
        for (int i = 1; i < count; i++) {
            scanf("%d", &num);
            if (num < min) {
                num = num ^ min;
                min = num ^ min;
                num = num ^ min;
            }
            if (num > max) {
                num = num ^ max;
                max = num ^ max;
                num = num ^ max;
            }
            sum += (float) num;
        }
        printf("%.2f\n", sum / (count - 2));
    }
    return 0;
}